package com.woniu.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.entity.Bank;
import org.springframework.web.multipart.MultipartFile;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hyl,fzn
 * @since 2022-08-28
 * 方便理解，暂时不使用mybatisPlus的内置方法
 */
public interface IBankService extends IService<Bank> {
    void insertBank(Bank bank);
    void updateBank(Bank bank);
    Bank selectOneBank(Bank bank);
    Bank selectBankById(Integer bankId);
    BigDecimal debitMoney(Bank bank, BigDecimal targetdeBitMoeny);
    void deleteOneBank(Bank bank);
    Page<Bank> getAnyBankAccountsWithPage(Integer pageNum, Integer pageSize, Bank bank);
    List<Bank> getBankByCondition(Bank bank);
    /**
     * 导入数据，从excel表格里面获取数据，更新到数据库
     * @param fileName
     * @param file
     * @return
     * @throws Exception
     */
    boolean batchImport(String fileName, MultipartFile file) throws Exception;
}
